BasicAuthHandler

data class BasicAuthHandler(username: String, password: String) : HeaderProvider

Request handler for basic auth.

Constructors

BasicAuthHandler
Link copied to clipboard
fun BasicAuthHandler(username: String, password: String)

Functions

canHandleAuthentication
Link copied to clipboard
open fun canHandleAuthentication(response: HttpResponse): Boolean
If this returns true, handleAuthentication must be implemented.
handleAuthentication
Link copied to clipboard
open suspend fun handleAuthentication(client: HttpClient, url: URL, data: Any, options: <ERROR CLASS>): HttpResponse
Will not be called unless canHandleAuthentication is true.
headers
Link copied to clipboard
open override fun MutableHeaders.headers()
plus
Link copied to clipboard
open operator fun plus(other: HeaderProvider): HeaderProvider
prepareRequest
Link copied to clipboard
open override fun <ERROR CLASS>.prepareRequest(headers: MutableHeaders)
Modify an outgoing request.

Properties

password
Link copied to clipboard
val password: String
username
Link copied to clipboard
val username: String

Sources

js source
Link copied to clipboard